#ifndef MYWIDGET_H
#define MYWIDGET_H

#include <QObject>
#include <QWidget>
#include <QPoint>
#include <QPaintEvent>
#include <QImage>
#include <QSize>
class QImage;
class mywidget : public QWidget
{
    Q_OBJECT
    Q_PROPERTY(QPoint imagepos READ imagePos WRITE setImagePos);
    Q_PROPERTY(QSize imagescale READ ImageScale WRITE setImageScale);
//    Q_PROPERTY(qreal rotate READ imagePos WRITE setRotate);
public:
    explicit mywidget(QWidget *parent = nullptr);
    QPoint imagePos()
    {
        return m_imagePos;
    }
    void setImagePos(const QPoint &pos)
    {
        m_imagePos=pos;
        update();
    }
    QSize ImageScale()
    {
        return m_inageScale;
    }

    void setImageScale(const QSize &size)
    {
        m_inageScale=size;
        update();
    }
protected:
    void paintEvent(QPaintEvent *event) override;
signals:

private:
   QPoint m_imagePos;
   QSize m_inageScale;
   QImage *image;
};

#endif // MYWIDGET_H
